package com.life.ai.server.common.excel;

import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * excel返回对象
 * ExcelResult
 *
 * @author kylewka
 * @since 2023/9/1
 */
@Getter
@Setter
public class ExcelResult<T> {

    /**
     * 对象列表
     */
    private List<T> dataList;

    /**
     * 成功处理的对象数量
     */
    private int successCount;

    /**
     * 错误列表
     */
    private List<String> errorList;

    public ExcelResult() {
        this.dataList = new ArrayList<>();
        this.errorList = new ArrayList<>();
    }

    public void increment() {
        successCount++;
    }
}
